<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <style></style>
  </head>
  <body>
    <div>
      <h1>ES2016</h1>
      <p>1.includes,以前的indexOf方法不能查找NaN,但是includes方法可以</p>
      <p>指数运算符</p>
    </div>
    <script>
      const arr = ["foo", 1, NaN, false];
      console.log(arr.indexOf("foo")); //0---返回下标
      console.log(arr.indexOf(NaN)); //-1   因为indexOf方法不识别NaN
      console.log(arr.includes("foo")); //true
      console.log(arr.includes(NaN)); //true

      //   指数运算符;
      //   以前
      console.log(Math.pow(2, 10)); //1024
      //ES2016
      console.log(2 ** 10); //1024
    </script>
  </body>
</html>
